﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类vCompany
	/// </summary>
	[Serializable]
	public class vCompany : Entity 
	{ 
		 public vCompany() 
            : base("vCompany") 
        { 

        }


		#region Model
		private int _UID;
		private string _Code;
		private string _Short;
		private string _ChnName;
		private string _EngName;
		private string _ChnAddr;
		private string _EngAddr;
		private string _ChnBank;
		private string _EngBank;
		private string _ChnAccountNo;
		private string _EngAccountNo;
		private string _BusNo;
		private string _TaxNo;
		private string _TEL;
		private string _FAX;
		private string _EML;
		private string _IDX;
		private int? _Period;
		private bool? _IsSelect;
		private string _Note;
		private int? _UserCreateID;
		private string _UserCreate;
		private string _CreateDate;
		private string _UserModify;
		private int? _UserModifyID;
		private string _ModifyDate;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Code
		{
			get{ return _Code; }
			set
			{
				this.OnPropertyValueChange(_.Code,_Code,value);
				this._Code = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Short
		{
			get{ return _Short; }
			set
			{
				this.OnPropertyValueChange(_.Short,_Short,value);
				this._Short = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ChnName
		{
			get{ return _ChnName; }
			set
			{
				this.OnPropertyValueChange(_.ChnName,_ChnName,value);
				this._ChnName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string EngName
		{
			get{ return _EngName; }
			set
			{
				this.OnPropertyValueChange(_.EngName,_EngName,value);
				this._EngName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ChnAddr
		{
			get{ return _ChnAddr; }
			set
			{
				this.OnPropertyValueChange(_.ChnAddr,_ChnAddr,value);
				this._ChnAddr = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string EngAddr
		{
			get{ return _EngAddr; }
			set
			{
				this.OnPropertyValueChange(_.EngAddr,_EngAddr,value);
				this._EngAddr = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ChnBank
		{
			get{ return _ChnBank; }
			set
			{
				this.OnPropertyValueChange(_.ChnBank,_ChnBank,value);
				this._ChnBank = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string EngBank
		{
			get{ return _EngBank; }
			set
			{
				this.OnPropertyValueChange(_.EngBank,_EngBank,value);
				this._EngBank = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ChnAccountNo
		{
			get{ return _ChnAccountNo; }
			set
			{
				this.OnPropertyValueChange(_.ChnAccountNo,_ChnAccountNo,value);
				this._ChnAccountNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string EngAccountNo
		{
			get{ return _EngAccountNo; }
			set
			{
				this.OnPropertyValueChange(_.EngAccountNo,_EngAccountNo,value);
				this._EngAccountNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string BusNo
		{
			get{ return _BusNo; }
			set
			{
				this.OnPropertyValueChange(_.BusNo,_BusNo,value);
				this._BusNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string TaxNo
		{
			get{ return _TaxNo; }
			set
			{
				this.OnPropertyValueChange(_.TaxNo,_TaxNo,value);
				this._TaxNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string TEL
		{
			get{ return _TEL; }
			set
			{
				this.OnPropertyValueChange(_.TEL,_TEL,value);
				this._TEL = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string FAX
		{
			get{ return _FAX; }
			set
			{
				this.OnPropertyValueChange(_.FAX,_FAX,value);
				this._FAX = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string EML
		{
			get{ return _EML; }
			set
			{
				this.OnPropertyValueChange(_.EML,_EML,value);
				this._EML = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string IDX
		{
			get{ return _IDX; }
			set
			{
				this.OnPropertyValueChange(_.IDX,_IDX,value);
				this._IDX = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? Period
		{
			get{ return _Period; }
			set
			{
				this.OnPropertyValueChange(_.Period,_Period,value);
				this._Period = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSelect
		{
			get{ return _IsSelect; }
			set
			{
				this.OnPropertyValueChange(_.IsSelect,_IsSelect,value);
				this._IsSelect = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Note
		{
			get{ return _Note; }
			set
			{
				this.OnPropertyValueChange(_.Note,_Note,value);
				this._Note = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserCreate
		{
			get{ return _UserCreate; }
			set
			{
				this.OnPropertyValueChange(_.UserCreate,_UserCreate,value);
				this._UserCreate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserModify
		{
			get{ return _UserModify; }
			set
			{
				this.OnPropertyValueChange(_.UserModify,_UserModify,value);
				this._UserModify = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModifyDate
		{
			get{ return _ModifyDate; }
			set
			{
				this.OnPropertyValueChange(_.ModifyDate,_ModifyDate,value);
				this._ModifyDate = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.Code,
				_.Short,
				_.ChnName,
				_.EngName,
				_.ChnAddr,
				_.EngAddr,
				_.ChnBank,
				_.EngBank,
				_.ChnAccountNo,
				_.EngAccountNo,
				_.BusNo,
				_.TaxNo,
				_.TEL,
				_.FAX,
				_.EML,
				_.IDX,
				_.Period,
				_.IsSelect,
				_.Note,
				_.UserCreateID,
				_.UserCreate,
				_.CreateDate,
				_.UserModify,
				_.UserModifyID,
				_.ModifyDate
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_Code,
				_Short,
				_ChnName,
				_EngName,
				_ChnAddr,
				_EngAddr,
				_ChnBank,
				_EngBank,
				_ChnAccountNo,
				_EngAccountNo,
				_BusNo,
				_TaxNo,
				_TEL,
				_FAX,
				_EML,
				_IDX,
				_Period,
				_IsSelect,
				_Note,
				_UserCreateID,
				_UserCreate,
				_CreateDate,
				_UserModify,
				_UserModifyID,
				_ModifyDate
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "Code":
                    this._Code = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Short":
                    this._Short = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ChnName":
                    this._ChnName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "EngName":
                    this._EngName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ChnAddr":
                    this._ChnAddr = DataHelper.ConvertValue<string>(value);
                    break; 
				case "EngAddr":
                    this._EngAddr = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ChnBank":
                    this._ChnBank = DataHelper.ConvertValue<string>(value);
                    break; 
				case "EngBank":
                    this._EngBank = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ChnAccountNo":
                    this._ChnAccountNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "EngAccountNo":
                    this._EngAccountNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "BusNo":
                    this._BusNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "TaxNo":
                    this._TaxNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "TEL":
                    this._TEL = DataHelper.ConvertValue<string>(value);
                    break; 
				case "FAX":
                    this._FAX = DataHelper.ConvertValue<string>(value);
                    break; 
				case "EML":
                    this._EML = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IDX":
                    this._IDX = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Period":
                    this._Period = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "IsSelect":
                    this._IsSelect = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "Note":
                    this._Note = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "UserCreate":
                    this._UserCreate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModify":
                    this._UserModify = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ModifyDate":
                    this._ModifyDate = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "Code":
                    return this._Code; 
				case "Short":
                    return this._Short; 
				case "ChnName":
                    return this._ChnName; 
				case "EngName":
                    return this._EngName; 
				case "ChnAddr":
                    return this._ChnAddr; 
				case "EngAddr":
                    return this._EngAddr; 
				case "ChnBank":
                    return this._ChnBank; 
				case "EngBank":
                    return this._EngBank; 
				case "ChnAccountNo":
                    return this._ChnAccountNo; 
				case "EngAccountNo":
                    return this._EngAccountNo; 
				case "BusNo":
                    return this._BusNo; 
				case "TaxNo":
                    return this._TaxNo; 
				case "TEL":
                    return this._TEL; 
				case "FAX":
                    return this._FAX; 
				case "EML":
                    return this._EML; 
				case "IDX":
                    return this._IDX; 
				case "Period":
                    return this._Period; 
				case "IsSelect":
                    return this._IsSelect; 
				case "Note":
                    return this._Note; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "UserCreate":
                    return this._UserCreate; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModify":
                    return this._UserModify; 
				case "UserModifyID":
                    return this._UserModifyID; 
				case "ModifyDate":
                    return this._ModifyDate; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","vCompany");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","vCompany","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Code = new Field("Code","vCompany","Code");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Short = new Field("Short","vCompany","Short");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ChnName = new Field("ChnName","vCompany","ChnName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field EngName = new Field("EngName","vCompany","EngName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ChnAddr = new Field("ChnAddr","vCompany","ChnAddr");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field EngAddr = new Field("EngAddr","vCompany","EngAddr");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ChnBank = new Field("ChnBank","vCompany","ChnBank");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field EngBank = new Field("EngBank","vCompany","EngBank");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ChnAccountNo = new Field("ChnAccountNo","vCompany","ChnAccountNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field EngAccountNo = new Field("EngAccountNo","vCompany","EngAccountNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field BusNo = new Field("BusNo","vCompany","BusNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field TaxNo = new Field("TaxNo","vCompany","TaxNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field TEL = new Field("TEL","vCompany","TEL");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FAX = new Field("FAX","vCompany","FAX");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field EML = new Field("EML","vCompany","EML");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IDX = new Field("IDX","vCompany","IDX");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Period = new Field("Period","vCompany","Period");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSelect = new Field("IsSelect","vCompany","IsSelect");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Note = new Field("Note","vCompany","Note");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","vCompany","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreate = new Field("UserCreate","vCompany","UserCreate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","vCompany","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModify = new Field("UserModify","vCompany","UserModify");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","vCompany","UserModifyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModifyDate = new Field("ModifyDate","vCompany","ModifyDate");
		}
		#endregion

 
	}
}

